<?php
/**
 * Created by PhpStorm.
 * User: jochen
 * Date: 2016/10/24
 * Time: 下午4:38
 */

namespace App\Services\Repo;


use App\Services\Interfaces\RepoServiceInterface;
use Illuminate\Database\Eloquent\Model;
use App\Models\Tag;

class TagRepo implements RepoServiceInterface
{

    /**
     * 新增数据
     * @param array|null $_options
     * @return Model
     */
    public function create(array $_options = null):Model
    {
        // TODO: Implement create() method.
    }

    /**
     * 查询数据集合
     * @param int $limit
     * @return mixed
     */
    public function read($limit = 0)
    {
        return Tag::all();
    }

    /**
     * 查询数据详情
     * @param array $_filter
     * @return Model
     */
    public function find(array $_filter):Model
    {
        // TODO: Implement find() method.
    }

    /**
     * 修改数据
     * @param array $_filter
     * @param array $_update_data
     * @return bool
     * <code>
     * $instance->update(['id'=>'xxx'], ['name'=>'newName']);
     * </code>
     */
    public function update(array $_filter, array $_update_data):bool
    {
        // TODO: Implement update() method.
    }

    /**
     * 删除数据
     * @param array $_filter
     * @return bool
     */
    public function delete(array $_filter):bool
    {
        // TODO: Implement delete() method.
    }
}